package com.tcreditdemo;

import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import java.util.ArrayList;

public class MeFragment extends BaseFragment {
    private RecyclerView me_recycler;
    ArrayList<ArrayList<Integer>> datas=new ArrayList<>();
    ArrayList<Integer> data0=new ArrayList<>();
    ArrayList<Integer> data1=new ArrayList<>();
    ArrayList<Integer> data2=new ArrayList<>();



    @Override
    public int getlayout() {
        return R.layout.me_fragment_home;
    }

    @Override
    public void initialize() {
        initdatas();
        me_recycler = (RecyclerView) view.findViewById(R.id.me_recycler);
        LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());
        me_recycler.setLayoutManager(layoutManager);
        me_recycler.setAdapter(new MeRecyclerAdapter(getActivity(),datas));


    }

    public void initdatas(){
        for (int i=0;i<4;i++){
            data1.add(i);
            if (i<2){
                data0.add(i);
                //data2.add(i);
            }

        }

        data2.add(6);
        data2.add(6);

        datas.add(data0);
        datas.add(data1);
        datas.add(data2);
    }

}
